
package controller;

import interfaces.ITransaction;
import common.TransactionInteger;
import java.util.LinkedList;

public class FileProcessorInteger extends FileProcessor{
    @Override
    protected void processTransactions() throws Exception{
            String line;
            String[] sItems;
            int[] items=null;
            transactions = new LinkedList<ITransaction>();
            
            while (stream.ready()){
                line = stream.readLine();
                sItems = line.split(" ");
                if (sItems.length==0) continue;
                items = new int[sItems.length];

                for (int i=0; i<sItems.length; ++i){
                    items[i] = Integer.parseInt(sItems[i]);  
                }
                
                if (items!=null){
                    transactions.add(new TransactionInteger(items));
                }
            }       
    }
}
